<template>
  <div>
    <!-- 我的毕设课题 -->
    <el-descriptions :column="1" border>
      <el-descriptions-item>
        <template slot="label"> 姓名 </template>
        {{ list.student_name }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 学号 </template>
        {{ list.student_num }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 学院 </template>
        {{ list.student_college }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">专业 </template>
        {{ list.student_class }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 电话 </template>
        {{ list.phone }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 邮箱 </template>
        {{ list.email }}
      </el-descriptions-item>
    </el-descriptions>
    <el-button @click="goback">返回上一级</el-button>
  </div>
</template>
<script>
export default {
  created () {
    this.gettopicinfo();
  },
  data () {
    return {
      list: [],
    };
  },
  methods: {
    goback () {
      this.$router.go(-1);
    },
    gettopicinfo () {
      const id = window.location.hash.substring(17);
      this.$http
        .get("http://127.0.0.1:8080/teacher/getAllinfo?id=" + id)
        .then((res) => {
          this.list = res.data.data[0];
        })
        .catch((err) => {
          this.$message.error(err);
        });
    },
  },
};
</script>
<style lang="less" scoped>
.el-button {
  float: right;
  margin: 20px 0;
}
</style>
